<template>
  <div ref="chartRef">threeJs</div>
</template>

<script>
import dataJson from '@/views/three/world/data.json';
import World from '@/views/three/world/Word.js';

export default {
  name: 'ThreeJs',
  mounted() {
    this.init();
  },
  methods: {
    init() {
      const dom = this.$refs['chartRef'];
      if (dom) {
        new World({
          dom: dom,
          data: dataJson,
          width: 800,
          height: 800
        });
      }
    }
  }
};
</script>

<style scoped lang="scss"></style>
